			<script type="text/javascript">
				function verifform()
				{
					var erreur = false;
					
					var firstname = $('#firstname').val();
					var surname = $('#surname').val();
					var address = $('#address').val();
					var zip = $('#zip').val();
					var city = $('#city').val();
					var country = $('#country').val();
					var email = $('#email').val();
					var jour = $('#jour').val();
					var mois = $('#mois').val();
					var annee = $('#annee').val();
					document.getElementById('birthdate').value = jour + '/' + mois + '/' + annee;
					var birthdate = $('#birthdate').val();
					var accept = $('#hid_accept').val();
					
					if (firstname.length < 1)
					{
						erreur = true;
						document.getElementById('span_firstname').style.color = '#c9070e';
					}
					else
						document.getElementById('span_firstname').style.color = '#000';
					
					if (surname.length < 1)
					{
						erreur = true;
						document.getElementById('span_surname').style.color = '#c9070e';
					}
					else
						document.getElementById('span_surname').style.color = '#000';
					
					if (address.length < 1)
					{
						erreur = true;
						document.getElementById('span_address').style.color = '#c9070e';
					}
					else
						document.getElementById('span_address').style.color = '#000';
					
					if (zip.length < 1)
					{
						erreur = true;
						document.getElementById('span_zip').style.color = '#c9070e';
					}
					else
						document.getElementById('span_zip').style.color = '#000';
					
					if (city.length < 1)
					{
						erreur = true;
						document.getElementById('span_city').style.color = '#c9070e';
					}
					else
						document.getElementById('span_city').style.color = '#000';
					
					
					if (country == '{{=trad('Choose', APPLNG)}}')
					{
						erreur = true;
						document.getElementById('span_country').style.color = '#c9070e';
					}
					else
						document.getElementById('span_country').style.color = '#000';
					if (email.length < 1)
					{
						erreur = true;
						document.getElementById('span_email').style.color = '#c9070e';
					}
					else
						document.getElementById('span_email').style.color = '#000';
					
					if (birthdate.length < 1)
					{
						erreur = true;
						document.getElementById('span_birthdate').style.color = '#c9070e';
					}
					else
						document.getElementById('span_birthdate').style.color = '#000';
					if (accept != 'yes')
					{
						erreur = true;
						document.getElementById('tdcheckbox').style.backgroundColor = '#FDC8C9';
						document.getElementById('span_accept').style.color = '#c9070e';
					}
					else
					{
						document.getElementById('tdcheckbox').style.backgroundColor = '#ffffff';
						document.getElementById('span_accept').style.color = '#000';
					}
					
					if (!erreur)
					{
						if (!email.match("^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$"))
						{
							erreur = true;
							document.getElementById('span_email').style.color = '#c9070e';
							alert('{{=trad('Invalid email', APPLNG)}}');
						}
						else
							document.getElementById('span_email').style.color = '#000';
							
						if(!birthdate.match("^[0-9]{2}/[0-9]{2}/[0-9]{4}$"))
						{
							erreur = true;
							document.getElementById('span_birthdate').style.color = '#c9070e';
							alert('{{=trad('Invalid date of birth. Please use this format dd/mm/yyyy', APPLNG)}}');
						}
						else
							document.getElementById('span_birthdate').style.color = '#000';
					}
					
					if (!erreur)
					{
						var tabnaissance = birthdate.split('/');
						var jour = tabnaissance[0];
						var mois = tabnaissance[1];
						var annee = tabnaissance[2];
						if (annee > {{=date('Y')}})
						{
							erreur = true;
							document.getElementById('span_birthdate').style.color = '#c9070e';
							alert("{{=trad('Thanks to choose a valid year please.', APPLNG)}}");
						}
						else
							document.getElementById('span_birthdate').style.color = '#000';
						if (mois > 12)
						{
							erreur = true;
							document.getElementById('span_birthdate').style.color = '#c9070e';
							alert("{{=trad('Thanks to choose a valid month please.', APPLNG)}}");
						}
						else
							document.getElementById('span_birthdate').style.color = '#000';
						if (mois < 1)
						{
							erreur = true;
							document.getElementById('span_birthdate').style.color = '#c9070e';
							alert("{{=trad('Thanks to choose a valid month please.', APPLNG)}}");
						}
						else
							document.getElementById('span_birthdate').style.color = '#000';
						if (jour > 31)
						{
							erreur = true;
							document.getElementById('span_birthdate').style.color = '#c9070e';
							alert("{{=trad('Thanks to choose a valid day please.', APPLNG)}}");
						}
						else
							document.getElementById('span_birthdate').style.color = '#000';
						if (jour < 1)
						{
							erreur = true;
							document.getElementById('span_birthdate').style.color = '#c9070e';
							alert("{{=trad('Thanks to choose a valid day please.', APPLNG)}}");
						}
						else
							document.getElementById('span_birthdate').style.color = '#000';
						
						if (mois == '02' && jour > 28)
						{
							if (jour == 29)
							{
								if(annee % 400 == 0 || (annee % 4 == 0 && annee % 100 != 0))
									document.getElementById('span_birthdate').style.color = '#000';
								else
								{
									erreur = true;
									document.getElementById('span_birthdate').style.color = '#c9070e';
									alert(annee + " {{=trad('is not a leap year. Please correct your date of birth.', APPLNG)}}");
								}
							}
							else
							{
								erreur = true;
								document.getElementById('span_birthdate').style.color = '#c9070e';
								alert("{{=trad('Februar has 29 days in maximum. Please correct your date of birth.', APPLNG)}}");
							}
						}
						if (mois == '04' || mois == '06' || mois == '09' || mois == '11')
						{
							if (jour > 30)
							{
								erreur = true;
								document.getElementById('span_birthdate').style.color = '#c9070e';
								alert("{{=trad('This month does not contain 31 days. Please correct your date of birth.', APPLNG)}}");
							}
						}
						var majeur = {{=date("Y") - 18 . date('m') . date('d')}};
						var age = annee + mois + jour;
						if (majeur < age)
						{
							erreur = true;
							document.getElementById('span_birthdate').style.color = '#c9070e';
							alert("{{=trad('Free sample are only available for majors of age (18 years old and more)', APPLNG)}}");
						}
					}
					
					if (erreur == true)
						$('#error_form').show();
					else
						$('#formsample').submit();
				}
				
				function change_accept()
				{
					var old = $('#hid_accept').val();
					if (old == 'yes')
						document.getElementById('hid_accept').value = 'no';
					else
						document.getElementById('hid_accept').value = 'yes';
				}
			</script>
			
			{{$countries_sample = array(
				'Saudi Arabia',
				'Koweit',
				'Bahrein', 
				'Qatar', 
				'UAE',
				'Italy', 
				'UK', 
				'Germany', 
				'Russia', 
				'Switzerland',
				'Austria'
			);
			if($this -> id == 4)
				$countries_sample[] = 'Spain';
			sort($countries_sample);
			}}
			<div id="parfums_left_b_form">
			<br />
			To obtain your free sample of {{if($this -> id == 4):}}CDG 2{{else:}}Wonderwood{{endif;}}, please fill in your details and press submit to send the form. A sample will be sent to the address you provided.
			<p />
			Free sample only available for majors of age (18 years old and more) in {{for($i = 0 ; $i < sizeof($countries_sample) ; ++$i):}}{{if($i < sizeof($countries_sample) - 2):}}{{=aff_fo($countries_sample[$i])}}, {{endif;}}{{if($i == sizeof($countries_sample) - 2):}}{{=aff_fo($countries_sample[$i])}} {{=trad('and', APPLNG);}} {{endif;}}{{if($i == sizeof($countries_sample) - 1):}}{{=aff_fo($countries_sample[$i])}}{{endif;}}{{endfor;}}.
			</div>
			
			<div id="parfums_right_h1_form">
				<h1 {{if($this -> id == 7):}}style="font-size: 40px; line-eight: 40px;"{{endif;}}>{{if($this -> id == 4):}}CDG 2{{else:}}Wonderwood{{endif;}} Sample</h1>
			</div>
			
			<div class="clear15">&nbsp;</div>
			
			<div id="parfums_left_form">
				<div class="clear15">&nbsp;</div>
				<div class="clear15">&nbsp;</div>
				<div class="clear15">&nbsp;</div>
				<p>
					<img alt="{{if($this -> id == 4):}}Free perfume samples - CDG 2 - Comme des Garçons - eau de perfume spray{{else:}}Free perfume samples - Wonderwood - Comme des Garçons - eau de perfume spray{{endif;}}" title="{{if($this -> id == 4):}}Free perfume samples - CDG 2 - Comme des Garçons - eau de perfume spray{{else:}}Free perfume samples - Wonderwood - Comme des Garçons - eau de perfume spray{{endif;}}" src="{{=URL_SITE}}img/sample{{if($this -> id == 7):}}_ww{{endif;}}.jpg" width="445px" />
				</p>
			</div>
			<div id="parfums_right_form">
				<p>
					<form action="{{=URL_SITE}}" id="formsample" method="post">
					<fieldset style="border: none;">
					{{=form_hidden('action_form', 1)}}
					{{=form_hidden(NOMPAGE, $this -> page)}}
					{{=form_hidden('id_sample', $this -> id_sample)}}
					<input type="hidden" id="hid_accept" name="hid_accept" value="yes" />
					<table style="border: solid 0px #fff; background-color:#fff;" width="445" cellpadding="0" cellspacing="0">
						<tr>
							<td align="left"><span id="span_firstname">{{=trad('First Name', APPLNG)}}</span></td>
							<td><input name="firstname" id="firstname" class="input" type="text" size="50" tabindex="1" /></td>
						</tr>
						<tr>
							<td align="left"><span id="span_surname">{{=trad('Surname', APPLNG)}}</span></td>
							<td><input name="surname" id="surname" class="input" type="text" size="50" tabindex="2" /></td>
						</tr>
						<tr>
							<td align="left"><span id="span_address">{{=trad('Address', APPLNG)}}</span></td>
							<td><input maxlength="30" name="address" id="address" class="input" type="text" size="50" tabindex="3" /></td>
						</tr>
						<tr>
							<td align="left"><span id="span_address">{{=trad('Address 2', APPLNG)}}</span></td>
							<td><input maxlength="30" name="address_2" id="address_2" class="input" type="text" size="50" tabindex="4" /></td>
						</tr>
						<tr>
							<td align="left"><span id="span_zip">{{=trad('Postcode', APPLNG)}}</span></td>
							<td><input name="zip" id="zip" class="input" type="text" size="50" tabindex="5" /></td>
						</tr>
						<tr>
							<td align="left"><span id="span_city">{{=trad('City', APPLNG)}}</span></td>
							<td><input name="city" id="city" class="input" type="text" size="50" tabindex="6" /></td>
						</tr>
						<tr>
							<td align="left"><span id="span_country">{{=trad('Country', APPLNG)}}</span></td>
							<td>
								<select class="select" id="country" name="country" tabindex="7">
									<option>{{=trad('Choose', APPLNG)}}</option>
									{{foreach ($this -> liste_pays as $pays):}}
										<option value="{{=aff_fo($pays['id_country'])}}">
											{{=aff_fo($pays['name'])}}
										</option>
									{{endforeach;}}
								</select>
							</td>
						</tr>
						<tr>
							<td align="left"><span id="span_email">{{=trad('Email', APPLNG)}}</span></td>
							<td><input name="email" id="email" class="input" type="text" size="50" tabindex="8" /></td>
						</tr>
						<tr>
							<td align="left"><span id="span_birthdate">{{=trad('Date of Birth', APPLNG)}}</span></td>
							<td align="left" style="padding-left: 35px;">
								<input type="hidden" name="birthdate" id="birthdate" class="input" type="text" size="50" tabindex="9" />
								<select id="jour">
								{{for($i = 1 ; $i < 32 ; $i++):}}
								<option value="{{if($i < 10):}}0{{endif;}}{{=$i}}">{{if($i < 10):}}0{{endif;}}{{=$i}}</option>
								{{endfor;}}
								</select>
								&nbsp;&nbsp;
								<select id="mois">
								{{for($i = 1 ; $i < 13 ; $i++):}}
								<option value="{{if($i < 10):}}0{{endif;}}{{=$i}}">{{if($i < 10):}}0{{endif;}}{{=$i}}</option>
								{{endfor;}}
								</select>
								&nbsp;&nbsp;
								<select id="annee">
								{{for($i = date('Y') - 18 ; $i > 1899 ; $i--):}}
								<option value="{{if($i < 10):}}0{{endif;}}{{=$i}}">{{if($i < 10):}}0{{endif;}}{{=$i}}</option>
								{{endfor;}}
								</select>
							</td>
						</tr>
					</table>
					<table style="border: solid 0px #fff; background-color:#fff;" width="445" cellpadding="0" cellspacing="0">
				<tr>
					<td align="left">
						<p id="span_accept" class="tac">
							I hereby accept that my personal data be treated in accordance with the Spanish Data Protection Act (Ley Orgánica de Protección de Datos de carácter personal, L.O. 15/1999, de 13 de Diciembre). In agreement with the  L.O. 15/1999, I give permission for my personal data to be stored on the ANTONIO PUIG, S.A. database created for advertising and promotional purposes. I can exercise my rights of access, rectification, cancellation  and disagreement through a written request to ANTONIO PUIG, S.A. Comme des Garçons Marketing Department (Travessera de Gracia nº 9, 08021 Barcelona).
						</p>
					</td>
					<td style="width: 50px;" id="tdcheckbox">
						<input type="checkbox" id="accept" name="accept" value="yes" onclick="change_accept();" checked="checked" />
					</td>
				</tr>
				<tr>
					<td align="left">
						<br />
						&#9658;&nbsp; <a href="#" onclick="verifform(); return false;">SUBMIT</a>
						<br />
						<span id="error_form" style="color: #c9070e; display: none;">
							{{=trad('Please correct the red fields and try again.', APPLNG);}}
						</span>
					</td>
					<td>
						&nbsp;
					</td>
				</tr>
			</table>
					<p class="tac">{{=trad('The sample is sent free of charge following the information supplied in the above form, and while stocks last.', APPLNG)}} {{=trad('ANTONIO PUIG, Inc. declines any responsibility with regards to the routing of the sample. In the eventual case that the sample is not received within 31 days following the sending of the form, we suggest you renew your request.', APPLNG)}}</p>
					<p class="shoplinks">
						&#9658;&nbsp; 
						<a href="{{=URL_SITE}}terms-and-conditions/">
							Terms &amp; Conditions
						</a>
					</p>
					<br /><br />
					</fieldset>
					</form>
				</p>
			</div>